<?php
require_once BaseUtil::getModulePath("base") . '/models/BaseDao.php';

class EmailLogDao extends BaseDao {
    protected $_name;
    
    public function _setup(){
        $this->_name="email_logs";
        parent::_setup();
    }
    
    public function getEmailLogById($id){
    	$select = $this->db_r->select();
    	$select->from($this->_name);
    	$select->where($this->_name.'.id=?',$id);
        $select->where($this->_name.'.is_delete=?',0);
        $sql=$select->__toString();
        return $this->db_r->fetchRow($sql);
    }
    
    public function deleteEmailLog($id){
    	$set = array('is_delete' => 1);
        $where = $this->db_w->quoteInto('id=?', $id);
        $this->updateData($set, $where);
    }
}
